<template>
<!--我的关注-->
  <div class="attention" v-if="avatarInfo">
    <ul>
      <li v-for="(val,index) in avatarInfo" :key="index"><userAvatar :avatar='val'/></li>
    </ul>
      
  </div>
</template>

<script>
import require from "requests/index"
import userAvatar from 'components/notbusiness/userAvatar'
export default {
  name:'attention',
  data(){
    return{
      avatarInfo:null
    }
  },
  components:{
    userAvatar
  },
  methods:{
    getAttention(){
      require.getAttention(this.$store.state.userId).then(res=>{
        this.avatarInfo=res.data.follow
        //console.log(this.avatarInfo)
      })
    }
  },
  mounted(){
    this.getAttention()
  }
}
</script>

<style scoped lang='less'>
  .attention{
    width: 100%;
    ul{
      display: flex;
      flex-wrap: wrap;
    }
    li{
      margin: 15px 50px;
    }
  }
</style>